import request from '@/router/axios';

//获取待办事项
export const getToDoList = () => {
  return request({
    url: '/api/rapid-supervise/irsCheckTaskPlan/supervise/completion/shedule/list',
    method: 'get',
  })
}

/**
 * 检查主体总数
 * @returns {*}
 * @param params
 */

export const checkEntityCount = (params) => {
  return request({
    url: '/api/rapid-supervise/irsCheckTaskPlan/supervise/checkEntityCount',
    method: 'post',
    data: params,
  })
}

/**
 * 任务发布总数
 * @returns {*}
 * @param params
 */

export const publishPlanCount = (params) => {
  return request({
    url: '/api/rapid-supervise/irsCheckTaskPlan/supervise/publishPlanCount',
    method: 'post',
    data: params,
  })
}

//日程提醒 临期（3天内）和超期
export const getScheduleReminderList = () => {
  return request({
    url: '/api/rapid-supervise/irsCheckTaskInstance/mobileTask/queryNearAtTerm',
    method: 'get',
  })
}

//获取系统通知列表
export const getNoticeList = (current, size, params) => {
  return request({
    url: '/api/rapid-desk/notice/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

//获取备忘录列表
export const getMemoList = (current, size, params) => {
  return request({
    url: '/api/rapid-supervise/checkMemorandum/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

//新增备忘录
export const addMemo = (params) => request.post('/api/rapid-supervise/checkMemorandum/submit', {
  ...params
})

//删除备忘录
export const deleteMemo = (params) => {
  return request({
    url: '/api/rapid-supervise/checkMemorandum/remove',
    method: 'post',
    params: params,
  })
}
